1. Modifica il contratto bank aggiungendo la funzione external_transfer(receiver, quantity) che trasferire i tuoi soldi dal tuo conto in banca ad un indirizzo ethereum sulla blockchain. Verifica la funzione sulla blockchain Sepolia.2. Modifica il contratto bank aggiungendo la funzione take_the_money_and_run, che può essere attivata solo ll'owner (chi ha fatto il deploy del contratto), che trasferisce tutti i soldi della banca all'indirizzo dell'owner sulla blockchain. La banca risulta così totalmente svuotata e derubata. La funzione non aggiorna i bilanci, così i clienti sono ancora convinti di avere soldi dentro. Verifica la funzione sulla blockchain Sepolia.3. Modifica il contratto bank:- aggiungi una variabile uint fee- imposta owner e fee nel costruttore, fee come parametro- per ogni operazione, tranne tell_balance, inserisci una fee, che viene sottratta al bilancio di chi sta chiamando quella funzione. Ovviamente controlla che la persona abbia abbastanza soldi sul bilancio interno per pagare la fee.- crea la funzione set_fee, chiamabile solo dall'owner, che imposta il valore della feePresta attenzione a tutte le situazioni in cui la fee può rendere dei valori negativi e inserisci parecchi controlli!Non serve verificare sulla blockchain Sepolia.4. VEDI SOTTO IL MIO INDIRIZZO E ABIInteragisci con la mia banca, che ha una fee di solo 1 wei. Deposita soldi, fai un trasferimento interno su un account di uno dei tuoi colleghi (se nessuno vuole dirti il suo indirizzo, vai su sepolia.etherscan.io vai al mio indirizzo personale 0x8012c6Aa23D0eC6b1E4D42196DBdd474243d2CaF e lì vedi una lista di transazioni da che ho fatto a novembre 2022 ai tuoi colleghi). 5. DIFFICILE PERCHE' RICHIEDE AVERE A CHE FARE CON INT E UINT. A PARTE QUESTO PROBLEMA, E' MOLTO BREVE!E' OPZIONALE!Modifica il contratto bank (quello originale, altrimenti devi anche gestire le fee e diventa difficile) aggiungendo la funzione withdraw_in_the_red(quantity) che permette di prelevare più soldi di quanti ne hai sul tuo bilancio interno! La funzione deve però accertarsi che tu non stia ritirando più dell'80% di tutti i soldi presenti nella banca.Strategia:- il tuo problema più grosso è che i balances sono in uint, ma adesso possono diventare negativi. Quindi falli diventare int, ma quando aggiungi o li paragoni con cose uint come msg.value devi sempre convertire gli uint in int.- withdraw_in_red è identica a withdraw, ma devi cambiare il require. Attenzione che Solidity non ha float, quindi se fai una divisione è una divisione tra interi e rischi che arrotondi troppo. Meglio, se riesci, evitare la divisione.- Attenzione anche al caso in cui qualcuno cerca di preveare soldi normalmente (ne ha abbastanza sul suo balances) ma non può farlo perché qualcun altro ha prelevato troppo e la banca non ha abbastanza soldi per pagare.Per fare il test, devi depositare da due indirizzi diversi e dopo cercare di ritirare poco di più di quanto ha uno dei due indirizzi. Infine prova a ritirare tantissimo in modo da eccedere il limite dell'80%. Verificalo sulla blockchain Sepolia.1. Modify bank contract adding function external_transfer(receiver,quantity) which transfers your money from your bank's account to an ethereum address (to the address on the blockchain, not in the bank). Pay attention that the address in input must be payable, obviously. Put some money in your bank and do an external_transfer to your account 2. Send me the code.2. Modify bank contract adding function take_the_money_and_run, which can be activated only by the owner, which transfers all the money of the bank to the owner, regardless of the users' situation (better not pointing out to your customers that the bank is left without money, even though they can see it from the blockchain). To get to know the TOTAL amount of money inside the smart contract there is address(this).balance Test it. Send me the code and the contract's address on Sepolia's blockchain.3. Modify bank contract:- add a variable uint fee- set owner and fee in the constructor (owner is the user who deploys the bank, fee is decided by her/him when deploying)- for each operation (except views) insert a fee, subtracted from the balance of the user who originated the transaction. Obviously take care that the user has enough money.- build function set_fee which can be activated only by the owner and which changes the feeDo not forget to introduce some checkings that no user deposits an amount smaller than the fee or transfer/withdraw an amount but does not have enough to pay the bank's fee. Send me the code.4. My bank address: 0xC0619429A6456d546DfafB1AE1E583516FeC29A8My bank ABI: [ { "inputs": [], "name": "deposit", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "for_whom", "type": "address" } ], "name": "deposit_for_another", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "to_whom", "type": "address" }, { "internalType": "uint256", "name": "quantity", "type": "uint256" } ], "name": "internal_transfer", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "how_much", "type": "uint256" } ], "name": "withdraw", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "stateMutability": "payable", "type": "receive" }, { "inputs": [ { "internalType": "address", "name": "", "type": "address" } ], "name": "situation", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" } ]Interact with my bank. Deposit some money, make an internal_transfer to an account of one of your colleagues (if nobody wants to tell it to you, from Sepolia.etherscan.io go to my personal address 0x8012c6Aa23D0eC6b1E4D42196DBdd474243d2CaF and there you will see a long list of transactions of a few ether I did at the beginning of the course towards your colleagues). Leave the rest of your money there.5. DIFFICULT BECAUSE IT REQUIRES DEALING WITH INT AND UINT. APART FROM THIS IT IS SHORT!OPTIONAL AS ASSIGNMENT, CAN IT BE GOOD EXERCISE FOR MIDTERMModify bank contract (the original one, otherwise you will have to deal with fees and you will get crazy) adding function withdraw_in_the_red(quantity) which lets you withdraw more money than you have on your bank's account! The function must make sure that the user is withdrawing in this way no more than 80% of the total amount of money in the bank.Strategy:- your biggest problem is that balances are uint, but now they can go negative. Therefore make them int, but now whenever you compare/add them with quantities or msg.value you have to convert these latter ones to int before doing it. Only when everything is set up go on.- withdraw_in_red is identical to withdraw, but you have to change the require. Here you will remember that Solidity does not have float, so it won't accept 0.8. How can you check that something is smaller than 80/100 of something else without using the division? Use your math knowledge of equations...- pay attention that now it may happen that somebody tries to withdraw money which is in his balance... however the bank does not have enough funds because somebody else borrowed it all. You have to put an extra require to the original withdraw function. In order to test it, notice that you must deposit money from two different addresses and then try to withdraw slightly more than the current address' balance. And then try to withdraw a lot of money, to exceed the 80% limit.Send me the code and the contract's address.